1. Field of the Invention
The present invention relates to image processing apparatus and method which improve a distribution of brightness of a digital image.
2. Related Background Art
Conventionally, as a method of taking a photograph of appropriate brightness, a method of measuring average luminance of a scene to be taken or photographed and then controlling shutter speed, an aperture value and the like based on the measured average luminance is known. Moreover, an exposure control method based on so-called evaluation photometry that a scene is first divided into predetermined areas, luminance of each of the divided areas is measured, the measured luminance is appropriately weighted with respect to each area, average luminance is then obtained based on the weighted values, and appropriate exposure is thus obtained with respect to the entire scene is known.
Incidentally, in a scene taken against light (also called a backlight scene) that the brightness of a main subject is remarkably dark as compared with that of its background, the main subject portion on a taken or photographed image is inevitably dark. Therefore, to take a photograph in which appropriate brightness can be secured even in case of a backlight scene, it is necessary at the moment of taking the photograph to preset exposure of a camera so that the subject is taken brightly as compared with a case of taking an average photograph. However, such an exposure correction operation is troublesome for a user, and moreover skill is required to appropriately set the exposure of the camera. Besides, in a digital image process to the image obtained by capturing the backlight scene, a process equivalent to the exposure correction operation can be performed. However, in any case, even if the exposure correction is appropriately performed with respect to the main subject, the background portion of the main subject adversely tends to become bright excessively.
In order to solve such a problem, it is necessary to obtain an image of appropriate brightness even in the backlight scene or the like that it is generally difficult to appropriately determine the brightness of the image.
Thus, to achieve this, in analog photographing technique, print of appropriate brightness can be obtained by performing so-called a dodging process in a darkroom. Therefore, it is desirable even in a digital image process to easily achieve a dodging process similar to that in the analog photographing technique.
For example, a method of achieving the dodging process is proposed by Daniel J. Jobson et al. in “A Multiscale Retinex for Bridging the Gap Between Color Images and the Human Observation of Scenes”, IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 6, NO. 7, JULY 1997 (hereinafter called prior art 1). In this method, a difference process between a component obtained by logarithmic transforming a digital image and a low-frequency component of the logarithmic-transformed component is performed to darken a bright component and brighten a dark component in a low-frequency area in the digital image, thereby achieving image improvement.
Besides, other methods of achieving the dodging process in the digital image process are proposed by Reinhard et al. in “Photographic Tone Reproduction for Digital Images”, acm Transactions on Graphics, JULY 2002, Vol. 21, No. 3 (hereinafter called prior art 2), and Moroney “Local Color Correction Using Non-Linear Masking”, IS&T/SID Eighth Color Imaging Conference (hereinafter called prior art 3). In each of these methods, a dodging-like effect is obtained in the digital image process by using a luminance component of a digital image and a low-frequency component thereof.
However, in such conventional methods, a degree of improvement in a case where large improvement is necessary with respect to the brightness of the main subject in the digital image to be processed is the same as that in a case where a little improvement is necessary with respect to the brightness of the main subject. Therefore, there is a problem that it is impossible to perform suitable improvement of the luminance distribution for the image data to be processed. This originates mainly in a fact that a purpose concerning how it is necessary to improve the luminance distribution in the image data to be processed is not clear.
Moreover, conventionally, when the conventional dodging method is applied to a case where the scene obtained by photographing and capturing the digital image to be processed is not the backlight scene, there is a problem that, although an effect of the correction is inferior, a processing time is long and costs for a memory or the like used in the process are unnecessarily high as compared with the case where the exposure correction is normally performed by the digital image process. In addition, even in the backlight scene, the necessity of brightness correction is not high with respect to an image other than the image in which particularly a person's face has been recorded darkly due to backlight.